@charset "UTF-8";

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #f0eee7;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.clear {
    position: absolute;
    left: 30px;
    bottom: 30px;
}

.main-title {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-title button {
    margin: 0 20px;
    z-index: 2;
}

.cards-container {
    perspective: 1000px;
    position: relative;
    height: 300px;
    width: 500px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.card {
    position: absolute;
    opacity: 0;
    font-size: 16px;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: translateX(50%) rotateY(-10deg);
    transition: transform .4s ease, opacity .4s ease;
}

.card.active {
    cursor: pointer;
    opacity: 1;
    z-index: 10;
    transform: translateX(0) rotateY(0);
}

.card.left {
    transform: translateX(-50%) rotateY(10deg);
}

.inner-card {
    position: relative;
    height: 100%;
    width: 100%;
    box-shadow: 0 2px 10px #ddd;
    border-radius: 4px;
    transform-style: preserve-3d;
    transition: transform .4s ease;
}

.inner-card-front {
    transform: rotateX(0);
    z-index: 2;
}

.inner-card-back {
    transform: rotateX(180deg);
}

.inner-card-front,
.inner-card-back {
    height: 100%;
    width: 100%;
    background-color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.inner-card-front::after,
.inner-card-back::after {
    content: "Flip";
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 16px;
    color: #ddd;
}

.card.show-answer .inner-card {
    transform: rotateX(180deg);
}

.navigation {
    display: flex;
    margin: 20px 0;
}

.navigation .nav-btn {
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 20px;
}

.navigation p {
    margin: 0 20px;
}

.add-container {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    padding: 10px 0;
    background-color: #d4d3cd;
    border-top: 2px solid #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: -1;
    transition: .4s ease;
}

.add-container.show {
    opacity: 1;
    z-index: 2;
}

.add-title {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-title button {
    margin: 0 20px;
}

.question-form label {
    display: block;
    margin: 20px 0 10px;
}

.question-form textarea {
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    padding: 12px;
    min-width: 500px;
    max-width: 100%;
}

.btn {
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 4px;
    font-size: 14px;
    margin-top: 20px;
    padding: 10px 15px;
}

.btn-small {
    font-size: 12px;
    padding: 5px 10px;
}